<%--
  Created by IntelliJ IDEA.
  User: 陈奕安
  Date: 2025/5/27
  Time: 10:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>处理猜数</title>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");
    int counter=(int)session.getAttribute("counter");
    counter++;
    session.setAttribute("counter",counter);
    int ranNum=(int)session.getAttribute("ranNum");
   String txt= request.getParameter("numTxt");
   int numTxt=Integer.parseInt(txt);
   if (ranNum>numTxt){
       response.sendRedirect("small.jsp");
   }
   else if (ranNum<numTxt){
       response.sendRedirect("large.jsp");
   }else {
       response.sendRedirect("success.jsp");
   }



%>
</body>
</html>
